package cn.zy.jboa.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * BizLeave entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "biz_leave")
public class BizLeave implements java.io.Serializable {

	// Fields

	private Integer id;
	private SysEmployee sysEmployeeByEmployeeSn;
	private SysEmployee sysEmployeeByNextDealSn;
	private Timestamp starttime;
	private Timestamp endtime;
	private Double leaveday;
	private String reason;
	private String status;
	private String leavetype;
	private String approveOpinion;
	private Timestamp createtime;
	private Timestamp modifytime;

	// Constructors

	/** default constructor */
	public BizLeave() {
	}

	/** minimal constructor */
	public BizLeave(SysEmployee sysEmployeeByEmployeeSn, Timestamp starttime,
			Timestamp endtime, Double leaveday, String reason) {
		this.sysEmployeeByEmployeeSn = sysEmployeeByEmployeeSn;
		this.starttime = starttime;
		this.endtime = endtime;
		this.leaveday = leaveday;
		this.reason = reason;
	}

	/** full constructor */
	public BizLeave(SysEmployee sysEmployeeByEmployeeSn,
			SysEmployee sysEmployeeByNextDealSn, Timestamp starttime,
			Timestamp endtime, Double leaveday, String reason, String status,
			String leavetype, String approveOpinion, Timestamp createtime,
			Timestamp modifytime) {
		this.sysEmployeeByEmployeeSn = sysEmployeeByEmployeeSn;
		this.sysEmployeeByNextDealSn = sysEmployeeByNextDealSn;
		this.starttime = starttime;
		this.endtime = endtime;
		this.leaveday = leaveday;
		this.reason = reason;
		this.status = status;
		this.leavetype = leavetype;
		this.approveOpinion = approveOpinion;
		this.createtime = createtime;
		this.modifytime = modifytime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EMPLOYEE_SN", nullable = false)
	public SysEmployee getSysEmployeeByEmployeeSn() {
		return this.sysEmployeeByEmployeeSn;
	}

	public void setSysEmployeeByEmployeeSn(SysEmployee sysEmployeeByEmployeeSn) {
		this.sysEmployeeByEmployeeSn = sysEmployeeByEmployeeSn;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NEXT_DEAL_SN")
	public SysEmployee getSysEmployeeByNextDealSn() {
		return this.sysEmployeeByNextDealSn;
	}

	public void setSysEmployeeByNextDealSn(SysEmployee sysEmployeeByNextDealSn) {
		this.sysEmployeeByNextDealSn = sysEmployeeByNextDealSn;
	}

	@Column(name = "STARTTIME", nullable = false, length = 0)
	public Timestamp getStarttime() {
		return this.starttime;
	}

	public void setStarttime(Timestamp starttime) {
		this.starttime = starttime;
	}

	@Column(name = "ENDTIME", nullable = false, length = 0)
	public Timestamp getEndtime() {
		return this.endtime;
	}

	public void setEndtime(Timestamp endtime) {
		this.endtime = endtime;
	}

	@Column(name = "LEAVEDAY", nullable = false, precision = 5, scale = 1)
	public Double getLeaveday() {
		return this.leaveday;
	}

	public void setLeaveday(Double leaveday) {
		this.leaveday = leaveday;
	}

	@Column(name = "REASON", nullable = false, length = 500)
	public String getReason() {
		return this.reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	@Column(name = "STATUS", length = 20)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "LEAVETYPE", length = 50)
	public String getLeavetype() {
		return this.leavetype;
	}

	public void setLeavetype(String leavetype) {
		this.leavetype = leavetype;
	}

	@Column(name = "APPROVE_OPINION", length = 100)
	public String getApproveOpinion() {
		return this.approveOpinion;
	}

	public void setApproveOpinion(String approveOpinion) {
		this.approveOpinion = approveOpinion;
	}

	@Column(name = "CREATETIME", length = 0)
	public Timestamp getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Timestamp createtime) {
		this.createtime = createtime;
	}

	@Column(name = "MODIFYTIME", length = 0)
	public Timestamp getModifytime() {
		return this.modifytime;
	}

	public void setModifytime(Timestamp modifytime) {
		this.modifytime = modifytime;
	}

}